﻿@model Bricks.Site.Models.DBViewModel.Project.VMProjectInfo

@{
    ViewBag.Title = "编辑项目";
    Layout = "~/Views/Shared/_UserPage.cshtml";
}

@*引入uEditor*@
<script type="text/javascript" charset="utf-8" src="/Res/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/Res/ueditor/ueditor.all.js"> </script>
<script type="text/javascript" charset="utf-8" src="/Res/ueditor/lang/zh-cn/zh-cn.js"></script>
<link rel="stylesheet" type="text/css" href="/Res/ueditor/themes/default/css/ueditor.css" />

<script type="text/javascript">
    //为什么这里在使用Dialog打开的时候启动不了呢？
    $(function () {
        $.MiniUEditorInit($("#hID").val(), "ProphaseManagement/ProjectInfo/BuildContent", "buildContent", 510, 150);  //迷你加载

        var isShowExtInfo = $("#hIsShowExtInfo").val();
        if (isShowExtInfo == "0")
        {
            RemoveTR("trHideOne");
            RemoveTR("trHideTwo");
            RemoveTR("trHideThree");
            RemoveTR("trHideFour");
            RemoveTR("trHideFive");
        }
    });

    function RemoveTR(trID)
    {
        var tr = document.getElementById(trID);
        var table = tr.parentNode;
        table.removeChild(tr);
    }

    //var Edit = {
    //    //上传文件
    //    Upload: function (tag) {
    //        debugger;
    //        var instanceID = $("#hID").val();
    //        $.Upload(instanceID, tag);
    //    }
    //}
</script>

<div class="frombox datagrid-body" style="padding-bottom: 5px;">
    <form id="project-model" method="post">
        <table class="datagrid-btable" border="0" cellspacing="0" cellpadding="0">
            <tr class="datagrid-row">
                <td class="th">
                    <div class="datagrid-cell">项目编码</div>
                </td>
                <td class="td">
                    <div class="datagrid-cell">
                        <input name="ProjectCode" class="easyui-textbox" data-options="required:true" value="@Model.ProjectCode" />
                    </div>
                </td>
                <td class="rth">
                    <div class="datagrid-cell">项目名称</div>
                </td>
                <td class="td">
                    <div class="datagrid-cell">
                        <input name="ProjectName" class="easyui-textbox" data-options="required:false" value="@Model.ProjectName" />
                    </div>
                </td>
            </tr>
            <tr class="datagrid-row">
                <td class="th">
                    <div class="datagrid-cell">登记人</div>
                </td>
                <td class="td">
                    <div class="datagrid-cell">
                        <input name="RegisterUser" class="easyui-textbox" data-options="required:false" value="@ViewBag.RegisterUser" style="background:#eeeeee;" readonly />
                    </div>
                </td>
                <td class="rth">
                    <div class="datagrid-cell">登记日期</div>
                </td>
                <td class="td">
                    <div class="datagrid-cell">
                        <input name="RegisterDate" class="easyui-datebox" data-options="required:false" value="@Model.RegisterDate" />
                    </div>
                </td>
            </tr>
            <tr class="datagrid-row">
                <td class="th">
                    <div class="datagrid-cell">建设类别</div>
                </td>
                <td class="td">
                    <div class="datagrid-cell">
                        <input id="buildType" name="BuildType" data-options="required:false" value="@Model.BuildType" />
                    </div>
                </td>
                <td class="rth">
                    <div class="datagrid-cell">投资类别</div>
                </td>
                <td class="td">
                    <div class="datagrid-cell">
                        <input id="investType" name="InvestType" data-options="required:false" value="@Model.InvestType" />
                    </div>
                </td>
            </tr>
            <tr class="datagrid-row">
                <td class="th">
                    <div class="datagrid-cell">建设内容</div>
                </td>
                <td class="td" colspan="3">
                    <div class="datagrid-cell">
                        <textarea id="buildContent" name="BuildContent">@Model.BuildContent</textarea>
                    </div>
                </td>
            </tr>
            <tr class="datagrid-row">
                <td class="th">
                    <div class="datagrid-cell">备注</div>
                </td>
                <td class="td" colspan="3">
                    <div class="datagrid-cell">
                        @*<input name="Description" class="easyui-textbox" data-options="required:false" style="width: 568px; " value="@Model.Description" />*@
                        <textarea name="Description" cols="68" rows="1" style="width: 510px; ">@Model.Description</textarea>
                    </div>
                </td>
            </tr>
            @*<tr class="datagrid-row">
                    <td class="text" colspan="2">
                        <div class="datagrid-cell">
                            <textarea id="BuildContent" name="BuildContent">@Model.BuildContent</textarea>
                        </div>
                    </td>
                </tr>*@
            <tr class="datagrid-row">
                <td class="th">
                    <div class="datagrid-cell">附件</div>
                </td>
                <td class="td" colspan="3">
                    <div class="datagrid-cell">
                        @*<input name="Attachment" class="easyui-textbox" data-options="required:false" style="width: 568px; " value="@Model.Attachment" />*@
                        @*<input type="text" id="file" />*@
                        <a href='javascript:void(0)' class='easyui-linkbutton' onclick='$.Upload($("#hID").val(), "ProphaseManagement/ProjectInfo/Attachment")' data-options='plain:true,iconCls:"icon-blue_lego"'>附件操作</a>
                        @*<a href='/Document/DocumentList' class='easyui-linkbutton' data-options='plain:true,iconCls:"icon-blue_lego"'>附件操作</a>*@
                        @*<input id="attachment" name="Attachment" type="hidden" value="@Model.Attachment" />*@
                        @*<input type="text" id="file" /><a href="javascript:void(0);" onclick="upFiles();">上传文件</a>*@
                    </div>
                </td>
            </tr>
            <tr class="datagrid-row" id="trHideOne">
                <td class="th">
                    <div class="datagrid-cell">建设单位</div>
                </td>
                <td class="td" colspan="3">
                    <div class="datagrid-cell">
                        <input name="BuildUnit" class="easyui-textbox" value="@Model.BuildUnit" style="background: #eeeeee; width: 510px;" readonly />
                    </div>
                </td>
            </tr>
            <tr class="datagrid-row" id="trHideTwo">
                <td class="th">
                    <div class="datagrid-cell">计划开工日期</div>
                </td>
                <td class="td">
                    <div class="datagrid-cell">
                        @*<input name="ScheduledStartDate" class="easyui-datebox" data-options="required:false,disabled:true" value="@Model.ScheduledStartDate" />*@
                        <input name="ScheduledStartDateStr" class="easyui-textbox" value="@Model.ScheduledStartDateStr" style="background: #eeeeee;" readonly />
                    </div>
                </td>
                <td class="th">
                    <div class="datagrid-cell">计划完工日期</div>
                </td>
                <td class="td">
                    <div class="datagrid-cell">
                        @*<input name="ScheduledEndDate" class="easyui-datebox" data-options="required:false,disabled:true" value="@Model.ScheduledEndDate" />*@
                        <input name="ScheduledEndDateStr" class="easyui-textbox" value="@Model.ScheduledEndDateStr" style="background: #eeeeee;" readonly />
                    </div>
                </td>
            </tr>
            <tr class="datagrid-row" id="trHideThree">
                <td class="th">
                    <div class="datagrid-cell">总工期</div>
                </td>
                <td class="td">
                    <div class="datagrid-cell">
                        <input name="Period" class="easyui-textbox" value="@Model.Period" style="background:#eeeeee;" readonly />
                    </div>
                </td>
                <td class="th">
                    <div class="datagrid-cell">计划总投资</div>
                </td>
                <td class="td">
                    <div class="datagrid-cell">
                        @*<input name="ScheduledInvestment" class="easyui-textbox" value="@Model.ScheduledInvestment" style="background:#eeeeee;" readonly />*@
                        <input name="ScheduledInvestment" class="easyui-numberbox" value="@Model.ScheduledInvestment" data-options="disabled:true,precision:0" />
                    </div>
                </td>
            </tr>
            <tr class="datagrid-row" id="trHideFour">
                <td class="th">
                    <div class="datagrid-cell">开始桩号</div>
                </td>
                <td class="td">
                    <div class="datagrid-cell">
                        <input name="StartStake" class="easyui-textbox" value="@Model.StartStake" style="background:#eeeeee;" readonly />
                    </div>
                </td>
                <td class="th">
                    <div class="datagrid-cell">结束桩号</div>
                </td>
                <td class="td">
                    <div class="datagrid-cell">
                        <input name="EndStake" class="easyui-textbox" value="@Model.EndStake" style="background:#eeeeee;" readonly />
                    </div>
                </td>
            </tr>
            <tr class="datagrid-row" id="trHideFive">
                <td class="th">
                    <div class="datagrid-cell">项目概况</div>
                </td>
                <td class="td" colspan="3">
                    <div class="datagrid-cell">
                        <textarea name="ProjectOverview" cols="68" rows="3" style="background: #eeeeee; width: 510px;" readonly>@Model.ProjectOverview</textarea>
                    </div>
                </td>
            </tr>
        </table>
        <input id="hID" name="ID" type="hidden" value="@Model.ID" />
        <input name="RegisterUserID" type="hidden" value="@Model.RegisterUserID" />
        @*<input name="OrderNo" type="hidden" value="@Model.OrderNo" />
            <input name="IsDeleted" type="hidden" value="@Model.IsDeleted" />
            <input name="AddDate" type="hidden" value="@Model.AddDate" />*@
        <input id="hIsShowExtInfo" name="IsShowExtInfo" type="hidden" value="@Model.IsShowExtInfo" />
    </form>
</div>
